﻿Imports System.Windows.Data
Public Class UriToBitmapConverter
    Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object
        Dim bi As New BitmapImage()
        bi.BeginInit()
        bi.DecodePixelWidth = 100
        bi.CacheOption = BitmapCacheOption.OnLoad
        bi.UriSource = New Uri(value.ToString())
        bi.EndInit()
        Return bi
    End Function
    Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object
        Throw New Exception("The method or operation is not implemented.")
    End Function
End Class
